/*
 * Jabberd2-json-libs-java  
 * Copyright (C) 2010 Antti Leppä / Foyt
 * http://www.foyt.fi
 * 
 * License: 
 * 
 * Licensed under GNU General Public License Version 3 (GPL) 
 * http://www.gnu.org/licenses/gpl.html
 */

package fi.foyt.jabberd2json;

public enum AuthRegRequestType {
  UserExists    ("userexists"),
  CheckPassword ("checkpassword"), 
  GetPassword   ("getpassword"),
  SetPassword   ("setpassword"),
  DeleteUser    ("deleteuser"),
  CreateUser    ("createuser");
  
  private AuthRegRequestType(String name) {
    this.name = name;
  }
  
  public String getName() {
    return name;
  }
  
  public static AuthRegRequestType getByName(String name) {
    for (AuthRegRequestType authRegRequestType : values()) {
      if (authRegRequestType.getName().equals(name))
        return authRegRequestType;
    }
    
    return null;
  }
  
  private String name;
}